package com.tulele.vtool.service;

import com.github.pagehelper.PageInfo;
import com.tulele.vtool.model.LookVideoInfo;
import com.tulele.vtool.model.PlatformSysInfo;
import com.tulele.vtool.model.VideoInfo;
import com.tulele.vtool.model.combinedEntity.*;

import java.util.List;

public interface IVideoInfoService {

    /**
     * 添加微信公众号文章
     * @param videoInfo
     * @return
     */
    int addWechatVideoInfo(VideoInfo videoInfo);

    /**
     * 修改微信公众号文章
     * @param videoInfo
     * @return
     */
    int modifyWechatVideoInfo(VideoInfo videoInfo);

    /**
     * 添加用户文章
     * @param videoInfo
     * @return
     */
    int addUserVideoInfo(VideoInfo videoInfo);

    /**
     * 修改用户文章
     * @param videoInfo
     * @return
     */
    int modifyUserVideoInfo(VideoInfo videoInfo);

    /**
     * 获取文章详情
     * @param videoId
     * @return
     */
    VideoInfo getVideoDetailInfo(Integer videoId);

    /**
     * 查询用户查看他人文章信息
     * @param lookVideoInfo
     * @return
     */
    PageInfo<CombinedUserLookOtherVideoInfo> getUserLookOtherVideoInfo(Integer pageNum, Integer pageSize, LookVideoInfo lookVideoInfo);

    /**
     * 根据品牌查询文章信息
     * @param userId
     * @return
     */
    PageInfo<CombinedVideoInfoByVideoBrand> getVideoInfoByBrand(Integer pageNum, Integer pageSize, Integer userId);

    /**
     * 根据文章类型查询文章信息
     * @param pageNum
     * @param pageSize
     * @param videoTypeId
     * @return
     */
    PageInfo<CombinedVideoInfoByVideoType> getVideoInfoByVideoType(Integer pageNum, Integer pageSize, Integer videoTypeId);

    /**
     * 查询指定数目的用户文章
     * @param userId
     * @return
     */
    List<CombinedUserVideoInfoBySpecialSize> getUserVideoInfoBySpecialSize(Integer userId, int recordSize);

    /**
     * 查询用户文章
     * @param userId
     * @return
     */
    PageInfo<CombinedUserOwnVideoInfo> getUserOwnVideoInfo(Integer pageNum, Integer pageSize, Integer userId);

    /**
     * 移除用户文章
     * @param videoInfo
     * @return
     */
    int removeUserVideoInfo(VideoInfo videoInfo);

    /**
     * 查询文章用户信息
     * @param videoId
     * @return
     */
    Integer getVideoUserInfo(Integer videoId);

    /**
     * 查看他人文章
     * @param lookVideoInfo
     * @return
     */
    int lookOtherUserVideo(LookVideoInfo lookVideoInfo, VideoInfo videoInfo, String lookUserNickName, String viewType);

    /**
     * 获取平台推荐文章信息
     * @return
     */
    List<PlatformRecommendVideoInfo> getPlatformRecommendVideoInfo();

    /**
     * 查询第三方爬取文章信息
     * @param videoInfo
     * @return
     */
    VideoInfo getSpiderVideoInfoByThirdVideoId(VideoInfo videoInfo);

    /**
     * 查询用户平台文章分享状态
     * @param videoInfo
     * @return
     */
    Integer getUserPlatformVideoShareStatus(VideoInfo videoInfo);

    /**
     * 查询平台品牌文章数据
     * @param brandId
     * @return
     */
    Integer getPlatformVideoCountByBrandId(Integer brandId);

    /**
     * 查询平台类型文章数据
     * @param typeId
     * @return
     */
    Integer getPlatformVideoCountByTypeId(Integer typeId);

    /**
     * 获取待处理的爬虫文章
     * @return
     */
    List<VideoInfo> getToBeProcessedSpiderVideoInfo();

    /**
     * 根据品牌查询平台给用户推荐文章
     * @return
     */
    List<PlatformRecommendVideoInfo> getPlatformRecommendVideoInfoByBrand(List<Integer> useBrandIds);

    /**
     * 根据类型查询平台给用户推荐文章
     * @return
     */
    List<PlatformRecommendVideoInfo> getPlatformRecommendVideoInfoByType(Integer videoTypeId);

    /**
     * 根据品牌随机查询文章信息
     * @param videoTypeId
     * @param recordSize
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> getVideoInfoByBrandForRand(Integer videoTypeId, int recordSize);

    /**
     * 根据文章类型随机查询文章信息
     * @param videoTypeId
     * @param recordSize
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> getVideoInfoByVideoTypeForRand(Integer videoTypeId, int recordSize);

    /**
     * 删除文章信息
     * @param videoId
     * @return
     */
    int pseudoDeleteVideoInfo(Integer videoId);

    /**
     * 根据用户关注的类型随机查询文章信息
     * @param videoTypeId
     * @param recordSize
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> getVideoInfoByUserConcernVideoTypeForRand(List<Integer> videoTypeId, int recordSize);

    /**
     * 生成推送文章
     * @param videoTypeId
     * @param recordSize
     * @return
     */
    String generateUserPushVideoInfo(List<Integer> videoTypeId, int recordSize, PlatformSysInfo platformSysInfoConfig);

    /**
     * 获取待添加redis的平台爬虫文章
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> getToBeAddRedisVideoInfoOfBrand();

    /**
     * 获取待移除redis的平台爬虫文章
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> getToBeRemoveRedisVideoInfoOfBrand();

    /**
     * 查询待添加至redis的类型文章信息
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> getToBeAddToRedisVideoInfoOfType();

    /**
     * 查询需要从redis中移除的类型文章信息
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> getToBeRemoveFromRedisVideoInfoOfType();

    /**
     * 查看他人打卡文章
     * @param lookVideoInfo
     * @return
     */
    //int lookOtherUserPunchClockVideo(LookVideoInfo lookVideoInfo, PunchClockVideoInfo punchClockVideoInfo, String lookUserNickName);

    /**
     * 临时查询无缩略图的文章
     * @return
     */
    List<CombinedVideoInfoByVideoBrand> tempQueryThumbnailNullInfo();

    /**
     * 获取用户分享的文章数目
     * @param userId
     * @return
     */
    int getUserSharedVideoCount(Integer userId);

    /**
     * 根据文章类型查询文章信息 --  通过文章热度值
     * @param videoTypeId
     * @param videoHotValue
     * @return
     */
    PageInfo<VideoListShowInfo> getVideoInfoByVideoTypeForHotScore(int pageNum, int pageSize, Integer videoTypeId, Integer videoHotValue);

    /**
     * 根据文章类型查询文章信息 --  通过文章热度值
     * @param videoBrandId
     * @return
     */
    PageInfo<VideoListShowInfo> getVideoInfoByVideoBrandForHotScore(int pageNum, int pageSize, Integer videoBrandId, Integer videoHotValue);

    /**
     * 根据文章类型查询指定数目的文章信息 --  通过文章热度值
     * @param videoTypeId
     * @param videoHotValue
     * @return
     */
    List<VideoListShowInfo> getVideoInfoByVideoTypeForHotScoreBySpecialSize(Integer videoTypeId, Integer videoHotValue, Integer recordSize);

    /**
     * 根据标题查询用户已经添加的微信文章ID
     * @param videoTitle
     * @param userId
     * @return
     */
    VideoInfo getUserAddedWxVideoInfoByTitle(Integer userId, String videoTitle);

    /**
     * 获取客户页面提示文字
     * @param userId
     * @param totalLookCount
     * @return
     */
    String generateCustomerPagePromptText(Integer userId, int totalLookCount);
}
